package Test;

import util.DaoUtil;
import dao.ProductMapper;
import entity.Product;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * ClassName:MybatisTest
 * Package:Test
 *
 * @date:2021/11/1 3:07 下午
 * @author: Tiangle
 */
public class MybatisTest {
    public static void main(String[] args) {
        DaoUtil du = DaoUtil.getDu();
        SqlSession sqlS = du.getSqlS();
        ProductMapper mapper = sqlS.getMapper(ProductMapper.class);
        List<Product> all = mapper.getAll();
        for (Product product : all) {
            System.out.println(product);
        }

    }
}
